/*gcc -c -o gtkToolbar.o gtkToolbar.c `pkg-config --cflags --libs gtk+-2.0`*/
#include "mygtk.h"
#include <gtk/gtk.h>

Toolitem_t *createToolItem(char *pic)
{
	return gtk_tool_button_new_from_stock(pic);
}

Toolitem_t *createSep()
{
	return gtk_separator_tool_item_new();
}

Widget_t *createToolBar()
{
	GtkWidget *toolBar;
	toolBar = gtk_toolbar_new();
	gtk_toolbar_set_style(GTK_TOOLBAR(toolBar), GTK_TOOLBAR_ICONS);
	return toolBar;
}

void addItemToToolbar(Widget_t *toolBar, Toolitem_t *item[], int num)
{
	for (int i = 0; i < num; ++i)
		gtk_toolbar_insert(GTK_TOOLBAR(toolBar), item[i], -1);
}

void addToolbarToBox(Widget_t *box, Widget_t *toolbar, int num)
{
	gtk_box_pack_start(GTK_BOX(box), toolbar, FALSE, FALSE, num);
}